package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchPumpsMapper;
import com.ruoyi.system.domain.DispatchPumps;
import com.ruoyi.system.service.IDispatchPumpsService;

/**
 * 机泵信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchPumpsServiceImpl implements IDispatchPumpsService 
{
    @Autowired
    private DispatchPumpsMapper dispatchPumpsMapper;

    /**
     * 查询机泵信息
     * 
     * @param pumpId 机泵信息主键
     * @return 机泵信息
     */
    @Override
    public DispatchPumps selectDispatchPumpsByPumpId(Long pumpId)
    {
        return dispatchPumpsMapper.selectDispatchPumpsByPumpId(pumpId);
    }

    /**
     * 查询机泵信息列表
     * 
     * @param dispatchPumps 机泵信息
     * @return 机泵信息
     */
    @Override
    public List<DispatchPumps> selectDispatchPumpsList(DispatchPumps dispatchPumps)
    {
        return dispatchPumpsMapper.selectDispatchPumpsList(dispatchPumps);
    }

    /**
     * 新增机泵信息
     * 
     * @param dispatchPumps 机泵信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchPumps(DispatchPumps dispatchPumps)
    {
        return dispatchPumpsMapper.insertDispatchPumps(dispatchPumps);
    }

    /**
     * 修改机泵信息
     * 
     * @param dispatchPumps 机泵信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchPumps(DispatchPumps dispatchPumps)
    {
        return dispatchPumpsMapper.updateDispatchPumps(dispatchPumps);
    }

    /**
     * 批量删除机泵信息
     * 
     * @param pumpIds 需要删除的机泵信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPumpsByPumpIds(Long[] pumpIds)
    {
        return dispatchPumpsMapper.deleteDispatchPumpsByPumpIds(pumpIds);
    }

    /**
     * 删除机泵信息信息
     * 
     * @param pumpId 机泵信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPumpsByPumpId(Long pumpId)
    {
        return dispatchPumpsMapper.deleteDispatchPumpsByPumpId(pumpId);
    }
}
